package hut.game;

import hut.game.sound.Music;
import hut.game.table.VanCo;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.view.View.OnClickListener;
import android.widget.Button;

public class NewOptionActivity extends Activity implements OnClickListener{
	Button btnPVP;
	Button btnPVC;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
		setContentView(R.layout.layout_newoption);
		btnPVP = (Button)findViewById(R.id.PVP);
		btnPVP.setOnClickListener(this);
		btnPVC = (Button)findViewById(R.id.PVC);
		btnPVC.setOnClickListener(this);
	}
	@Override
    protected void onResume() {
    	super.onResume();
    	Music.play(this, R.raw.u, true);
    }
	
	@Override
	protected void onPause() {
		super.onPause();
		Music.stop(this);
	}
	
	@Override
	public void onClick(View v) {
		switch (v.getId()) {
		case R.id.PVP:
			VanCo.state = true;
			Intent i = new Intent(NewOptionActivity.this,GameActivity.class);
			startActivity(i);
			finish();
			break;
		case R.id.PVC:
			VanCo.state = false;
			Intent j = new Intent(NewOptionActivity.this,GameActivity.class);
			startActivity(j);
			finish();
			break;

		default:
			break;
		}
	}
}
